<%@page import="java.util.Date"%>
<%@ page language="java" pageEncoding="utf-8"%>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" type="text/css" href="/layui/css/layui.css"/>
<link rel="stylesheet" type="text/css" href="/css/core.css?<%=new Date().getTime()%>"/>
<style type="text/css">
	body {background-color:#fff;}
	.layui-table .operating a {border-left:1px solid #aaa;padding:0px 7px;}
	.layui-table .operating a.first {border-left:0px;padding-left:0px;}
	.layui-table .operating a:hover {color:#000;}
	
	.quote-new {border-left-color:#f26828;padding-bottom:0px;}
	.quote-new .layui-btn {background-color:#f26828;}
	.quote-new .layui-form-label {width:30px;}
	
	.layui-btn-normal {background-color:#f26828;}
	
	.layui-laypage .layui-laypage-curr .layui-laypage-em {background-color:#f26828;}
</style>
<script type="text/javascript" src="/layui/layui.js"></script>
<script type="text/javascript" src="/js/public.js?<%=new Date().getTime()%>"></script>
<script type="text/javascript">
var $;
layui.use('jquery', function(){
	$ = layui.jquery;
});

function strToJson(str){
	return (new Function("return " + str))();
}

function ajaxFun(url, paramJson){
	var retJson;
	$.ajax({
		url : url,
		type : 'post',
		dataType : 'json',
		data : paramJson,
		async : false,
		success : function(data){
			//alert(JSON.stringify(data));
			if(JSON.stringify(data).indexOf('<title>您无权限访问该页面或该功能')>=0){
            	window.location.href = '/commons/notPower.jsp';
            }else if(JSON.stringify(data).indexOf('<title>登录-哈泊客户关系管理系统')>=0){
            	window.location.href = '/';
            }else{
				retJson = data;
			}
		},
		error : function (jqXHR, textStatus, errorThrown) {
			//alert(JSON.stringify(jqXHR));
            retJson = null;
            if(jqXHR.responseText.indexOf('<title>您无权限访问该页面或该功能')>=0){
            	window.location.href = '/commons/notPower.jsp';
            }else if(jqXHR.responseText.indexOf('<title>登录-哈泊客户关系管理系统')>=0){
            	window.location.href = '/';
            }else{
            	alert(textStatus + '\r\t' + JSON.stringify(jqXHR) + '\r\t' + errorThrown);
            }
        }
	});
	return retJson;
}
</script>